package bubbleSort;

public class Sample {
	int vTest[] = {5, 2, 3 , 15, 100}; 
	
	public Sample() {
		bubbleSort(vTest);
	}

	public void bubbleSort(int v[]) {		
		for (int i = v.length; i >= 1; i--) {
			for (int j = 1; j < i; j++) {
				if (v[j - 1] > v[j]) {
					int aux = v[j];
					v[j] = v[j - 1];
					v[j - 1] = aux;
				}
			}
		}
		
		for (int t = 0; t < 5; t++)
			System.out.println(v[t]);
	}

	public static void main(String[] args) {
		new Sample();
	}
}
